<%@taglib uri="/WEB-INF/struts-html.tld"  prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>

<html:form action="perpustakaan.do?action=cariBukuKeluar">
    <table cellpadding="1" cellspacing="1" width="100%">
        <tr class="netral">
            <td colspan="2"><bean:message key="perpustakaan.cariBuku"/></td>
        </tr>
        <tr class="form">
            <td><bean:message key="buku.buku"/></td>
            <td>: <html:text property="buku" size="100"/><html:submit><bean:message key="label.search"/></html:submit></td>
        </tr>
    </table>
</html:form>
<table cellpadding="1" cellspacing="1" width="100%">
    <tr class="netral">
        <td colspan="6"><bean:message key="label.tabel"/> <bean:message key="perpustakaan.cariBuku"/></td>
    </tr>
    <tr class="header">
        <td><bean:message key="label.no"/></td>
        <td><bean:message key="perpustakaan.kartuPerpus"/></td>
        <td><bean:message key="buku.kode"/></td>
        <td><bean:message key="buku.nama"/></td>
        <td><bean:message key="perpustakaan.tanggalPinjam"/></td>
        <td><bean:message key="perpustakaan.tanggalKembali"/></td>
    </tr>
    <logic:notEmpty name="listCariBuku">
        <c:forEach var="listCariBuku" items="${listCariBuku}" varStatus="row">
            <c:if test="${(row.count) % 2 == 0}"><tr class="over"></c:if>
            <c:if test="${(row.count) % 2 != 0}"><tr class="down"></c:if>
                <td width="5%"><c:out value="${row.count}"/></td>
                <td width="15%" align="left"><c:out value="${listCariBuku.kartuPerpus.kodeAccount}"/></td>
                <td width="15%" align="left"><c:out value="${listCariBuku.buku.kodeBuku}"/></td>
                <td width="35%" align="left"><c:out value="${listCariBuku.buku.namaBuku}"/></td>
                <td width="15%" align="left"><f:formatDate value="${listCariBuku.tanggalPinjam}" pattern="dd-MMM-yyyy"/></td>
                <td width="15%" align="left"><c:out value="${listCariBuku.tanggalKembali}"/></td>
            </tr>
        </c:forEach>
    </logic:notEmpty>
    <tr class="form">
        <td colspan="6">&nbsp;</td>
    </tr>
    <logic:empty name="listCariBuku">
        <tr class="form">
            <td colspan="6" align="center"><bean:message key="buku.buku"/> <bean:message key="label.isEmpty"/></td>
        </tr>
    </logic:empty>
</table>
